<template>
    <div class="container-content">
        <el-row>
            <el-col :span="24">
                <h3 class="panel-title">新增购买标书</h3>
            </el-col>
        </el-row>
        <el-divider class="divider"></el-divider>
        <el-form
            ref="formRef"
            :model="formObject"
            label-width="160px"
            label-position="left"
            class="mt20"
        >
            <el-row :gutter="20">
                <el-col :span="24">
                    <el-form-item label="已审批通过的标书记录">
                        <el-input v-model="formObject.bidId"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="具体购买时间">
                        <el-date-picker
                            v-model="formObject.buyTime"
                            type="date"
                            placeholder="选择日期"
                            style="width: 100%"
                        >
                        </el-date-picker>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="客户">
                        <el-input v-model="formObject.customerId"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="投标基础信息">
                        <el-input v-model="formObject.tenderId"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="添加用户">
                        <el-input v-model="formObject.userId"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <!-- <el-row :gutter="20">
                <el-col :span="24">
                    <el-form-item label="备注">
                        <el-input
                            v-model="formObject.remarks"
                            type="textarea"
                        ></el-input>
                    </el-form-item>
                </el-col>
            </el-row> -->
            <el-form-item label-width="0px">
                <el-button type="primary" @click="onSubmit">保存</el-button>
                <el-button>取消</el-button>
            </el-form-item>
        </el-form>
    </div>
</template>
<script>
import { addBuyList } from "@/api/system/tender";
export default {
    data() {
        return {
            formObject: {
                bidId: "",
                buyTime: "",
                changeTime: "",
                createTime: "",
                customerId: "",
                id: Date.now(),
                tenderId: "",
                token: "",
                userId: "",
            },
        };
    },
    methods: {
        onSubmit() {
            addBuyList(this.formObject).then((res) => {
                if (res.code === 200) {
                    this.$message({
                        message: "新增成功！",
                        type: "success",
                    });
                    this.$router.push({ path: "/Tender/Buy" });
                }
            });
        },
    },
    created() {},
};
</script>
<style lang="scss" scoped>
.divider {
    margin: 0;
}
</style>
